package com.smxy.daydayup.mapper;

import com.smxy.daydayup.pojo.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
  * @team daydayup
  * @time 2021-12-06 21:45
  */
@Mapper
public interface QuestionMapper {
    int deleteByPrimaryKey(Long questionId);

    int insert(Question record);

    int insertSelective(Question record);

    Question selectByPrimaryKey(Long questionId);

    int updateByPrimaryKeySelective(Question record);

    int updateByPrimaryKey(Question record);

    int deleteByLogic(@Param("questionId") Long questionId,
                      @Param("flag") boolean flag);

    List<Question> selectQuestionList(@Param("courseId") Long courseId,
                                      @Param("isDelete") Integer isDelete);

    List<Question> selectQuestionListBySort(@Param("courseId")Long courseId,
                                            @Param("questionSortId")Long questionSortId,
                                            @Param("isDelete") Integer isDelete);
}